<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--[if lt IE 9]-->
    <script type="text/javascript" src="../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../lib/respond.min.js?rev=@@hash"></script>
    <!--[endif]-->
    <link rel="stylesheet" type="text/css" href="../../static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../ht-css/Project.css"/>
    <link rel="stylesheet" type="text/css" href="../../ht-css/style-q.css"/>
    <link rel="stylesheet" type="text/css" href="../../ht-css/drop-down.css" />
    <!--[if IE 6]-->
    <script type="text/javascript" src="../../lib/DD_belatedPNG_0.0.8a-min.js?rev=@@hash"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <!--[endif]-->
    <title>单品促销</title>
    <style>
        .level1 ul li {
            height: 30px;
            line-height: 30px;
        }

        .level1 .level1-ul {
            border-bottom: 1px solid #dedede;
        }

        .level1 .level2-content ul:last-child {
            border-bottom: 1px solid #dedede;
            padding-bottom: 5px;
        }

        .tips:hover {
            cursor: pointer;
        }

        .table td {
            text-align: left;
        }
        #setProduct td {
            text-align: center;
        }
    </style>
</head>
<body>
<nav class="breadcrumb">首页 <span class="c-gray en">&gt;</span> <span>促销管理</span> <span class="c-gray en">&gt;</span> 创建单品促销活动<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px ;display:block" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<article class="page-container">
    <form class="ml-20 mr-20" id="form-member" method="post">
        <div class="bk-gray bg-1 pt-20">
            <div class="pl-20"><b>活动信息</b></div>
            <table class="table table_li">
                <tbody>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l lh-26 w-200 text-r"><span class="c-red pr-5">*</span><span>活动名称：</span></label>
                            <input id="activityName" name="activityName" maxlength="50" type="text" class="input-text f-l w-250 radius" placeholder="请输入活动名称" required>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l lh-26 w-200 text-r"><span class="c-red pr-5">*</span><span>生效时间：</span></label>
                            <input type="text" class="input-text Wdate radius f-l w-200" onclick="var min = minDataTime(); WdatePicker({minDate:min,maxDate:'#F{$dp.$D(\'endTime\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="startTime" name="startTime" placeholder="请选择时间" autocomplete="off" required readonly>
                            <span class="f-l pl-5 pr-5 lh-26">至</span>
                            <input onchange="endTimeChange()" type="text" class="input-text Wdate radius f-l w-200" onclick="var min = maxDataTime();WdatePicker({ minDate:min,endDate:'%y-%M-%d 00:00',dateFmt:'yyyy-MM-dd HH:mm:ss' })" id="endTime" name="endTime" placeholder="请选择时间" autocomplete="off" readonly>
                            <span class="f-l lh-26 pl-20">截至时间如不填代表长期有效</span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix" style="display: none" id="add_activity">
                            <label class="f-l lh-30 w-200 text-r"><span class="c-red pr-5">*</span><span class="c-red">活动对象：</span></label>
                            <div class="input_box sel_box sel_box02 col-xs-8 col-sm-9" style="margin-top: 4px;">
                                <input  type="text" class="dataval input-text radius f-l w-180 kild" readonly>
                                <i class="icon_arrow"></i>
                                <span class="placeholder02"><span class="all-radius">全部</span></span>
                                <ul class="ulbox item" style="display: none">
                                    <li class=""><input type="checkbox" crmCustomerId="10,20,30"><p class="checkboxall">全选</p></li>
                                    <li class="lidata" crmCustomerId="10" crmCustomername="普通客户"><input type="checkbox" class="evetyipt"><span>普通客户</span></li>
                                    <li class="lidata" crmCustomerId="20" crmCustomername="签约客户（非分销）" ><input type="checkbox" class="evetyipt"><span>签约客户（非分销）</span></li>
                                    <li class="lidata" crmCustomerId="30" crmCustomername="签约客户（分销）" ><input type="checkbox" class="evetyipt"><span>签约客户（分销）</span></li>
                                </ul>
                            </div>
                        </div>
                        <div class="row ml-10 clearfix" style="display: none" id="update_activity">
                            <label class="f-l lh-30 w-200 text-r"><span class="c-red pr-5">*</span><span class="c-red">活动对象：</span></label>
                            <span class="select-box w-200 f-l size-M radius">
                                <select id="activityPerson" name="activityPerson" class="select" required>
                                    <option value="">请选择活动对象</option>
                                    <option value="10">普通客户</option>
                                    <option value="20">签约客户（非分销）</option>
                                    <option value="30">签约客户（分销）</option>
                                </select>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l lh-30 w-200 text-r"><span class="c-red pr-5">*</span><span class="c-red">活动区域：</span></label>
                            <span class="select-box w-200 f-l size-M radius">
                                <select id="activityLocation" name="activityLocation" class="select" required>
                                    <option value="">请选择活动区域</option>
                                </select>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l lh-26 w-200 text-r"><span class="c-red pr-5">*</span><span>端名称：</span></label>
                            <div class="f-l lh-26">
                                <label class="pl-20"><input id="platform-10" name="platform" value="10" type="checkbox" class="checkbox" style="margin:0" required minlength="1">不限</label>
                                <label class="pl-20"><input id="platform-20" name="platform" value="20" type="checkbox" class="checkbox" style="margin:0">PC端</label>
                                <label class="pl-20"><input id="platform-30" name="platform" value="30" type="checkbox" class="checkbox" style="margin:0">移动端</label>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l lh-26 w-200 text-r"><span class="c-red pr-5">*</span><span>支付方式：</span></label>
                            <div class="f-l lh-26">
                                <label class="pl-20">
                                    <input id="payWay-9999" name="payWay" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0" required minlength="1" name="payWay" value="9999">不限
                                </label>
                                <label class="pl-20">
                                    <input id="payWay-1001" name="payWay" value="1001" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">在线支付
                                </label>
                                <label class="pl-20">
                                    <input id="payWay-1301" name="payWay" value="1301" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">线下汇款
                                </label>
                               <!-- <label class="pl-20">
                                    <input id="payWay-1401" name="payWay" value="1401" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">银行汇票
                                </label>-->
                                <label class="pl-20" id="payWay-1101-show">
                                    <input id="payWay-1101" name="payWay" value="1101" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">货到付款
                                </label>
                                <label class="pl-20" id="payWay-1201-show">
                                    <input id="payWay-1201" name="payWay" value="1201" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">账期支付
                                </label>
                                <!-- <label class="pl-20" id="payWay-1701-show">
                                    <input id="payWay-1701" name="payWay" value="1701" type="checkbox" onchange="payWayChange(this)" class="checkbox" style="margin:0">货到付款
                                </label> -->
                            </div>
                        </div>
                    </td>
                </tr>
                <tr id="discount">
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l w-200 lh-30 text-r"><span class="c-red pr-5">*</span><span>品类折扣率价格商品是否参与：</span></label>
                            <span class="select-box w-100 f-l size-M radius">
                                    <select id="enableCategoryDiscount" name="enableCategoryDiscount" class="select" required>
                                        <option value="">请选择</option>
                                        <option value="10">参与</option>
                                        <option value="20">不参与</option>
                                    </select>
                                </span>

                            <span class="f-l pl-10 lh-30" id="categoryDiscountRule_show">
                                <span class="f-l pl-10 lh-30">品类折扣率</span>
                                <select id="categoryDiscountRule" name="categoryDiscountRule" class="select-box w-150 f-l size-M radius ml-10">
                                    <option value="10">无限制</option>
                                    <option value="20">大于等于(&gt;=)</option>
                                    <option value="30">小于(&lt;)</option>
                                </select>
                            </span>
                            <span class="f-l pl-10 lh-30" id="categoryDiscount_show">
                                <input id="categoryDiscount" name="categoryDiscount" onchange="reduce(this)" type="text" class="input-text f-l radius w-100 ml-10" required>
                                <span class="f-l pl-10 lh-30">%的商品不参与</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l w-200 text-r"><span>广告词：</span></label>
                            <input id="advertisingWords" name="advertisingWords" maxlength="100" type="text" class="input-text f-l w-300 radius" placeholder="请输入广告词，该广告词可在活动商品详情页体现">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l w-200 text-r"><span>PC端活动定向URL：</span></label>
                            <input id="adPcUrl" name="adPcUrl" type="url" class="input-text f-l w-300 radius" maxlength="200" placeholder="请填写PC端活动Url">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="row ml-10 clearfix">
                            <label class="f-l w-200 text-r"><span>APP端活动定向URL：</span></label>
                            <input id="adAppUrl" name="adAppUrl" type="url" class="input-text f-l w-300 radius" maxlength="200" placeholder="请填写APP端活动Url">
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="line mt-10"></div>
            <div class="clearfix mt-10 ml-10 mb-10"><label class="f-l lh-26 w-100 text-r"><span class="c-red pr-5">*</span><span>选择活动商品：</span></label></div>
        </div>
        <div id="tab_topnav" class="HuiTab">
            <div class="tabBar clearfix" style="border-top:none">
                <span class="current" onclick="selectP()">第一步：选择商品</span>
                <span onclick="setP()">第二步：设置促销</span>
                <div id="template" class="f-r pr-30 mt-10">
                    <a id="dowmloadTemplate" href="javascript:void(0)">下载模板</a>
                    <a href="javascript:void(0)" onclick="askImport()" class="pl-20">导入文件</a>
                    <input type="file" id="file" name="image" onchange="changeExcel(event)" hidden>
                    <input id="fileButton" type="button" class="btn-secondary size-S radius" onclick="importExcel()" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;导入&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" hidden>
                </div>
            </div>


            <div class="tabCon bk-gray bg-1 pt-20 pb-20">
                <div class="pl-20" style="height:15px">
                    <div class="f-l category_select_box"></div>
                    <!--<span class="select-box size-M radius w-200" style="position: absolute;z-index: 2;">
                        <select id="class1" name="class1" class="select" onblur="this.size=1" onchange="this.size=1">
                            <option value="">请选择一级品类名称</option>
                        </select>
                    </span>
                    <span class="select-box w-200 size-M radius ml-10" style="position: absolute;z-index: 2; left: 244px;">
                        <select id="class2" name="class2" class="select" onblur="this.size=0" onchange="this.size=0">
                            <option value="">请选择二级品类名称</option>
                        </select>
                    </span>
                    <span class="select-box w-200 size-M radius ml-10" style="position: absolute;z-index: 2; left: 458px;">
                        <select id="class3" name="class3" class="select" onblur="this.size=0" onchange="this.size=0">
                            <option value="">请选择三级品类名称</option>
                        </select>
                    </span>
                    <span class="select-box w-200 size-M radius ml-10" style="position: absolute;z-index: 2; left: 672px;">
                        <select id="class4" name="class4" class="select" onblur="this.size=0" onchange="this.size=0">
                            <option value="">请选择四级品类名称</option>
                        </select>
                    </span>-->
                    <span class="select-box w-200 size-M radius ml-10">
                        <select id="state" class="select">
                            <option value="">状态</option>
                            <option value="1">上架</option>
                            <option value="2">下架</option>
                            <option value="0">未上架</option>
                        </select>
                    </span>
                </div>
                <div class="mt-10 pl-20 mt-40">
                    <input class="input-text w-200 radius" type="text" id="spuCode" value="" placeholder="请输入SPU码">
                    <input class="input-text w-200 ml-10 radius" type="text" id="skuCode" value="" placeholder="请输入SKU码">
<!--                    <input class="input-text w-200 ml-10 radius" type="text" id="productCode" value="" placeholder="请输入Code码">-->
<!--                    <input class="input-text w-200 ml-10 radius" type="text" id="helpCode" value="" placeholder="请输入商品助记码">-->
                    <input class="input-text w-200 ml-10 radius" type="text" id="spuName" value="" placeholder="请输入商品名称">
                    <input class="input-text w-200 ml-10 radius" type="text" id="brand" value="" placeholder="请输入品牌关键字">
                    <input type="button" onclick="searchProduct()" class="btn btn-secondary size-S radius ml-20" value="查&nbsp;&nbsp;询">
                    <input type="button" onclick="resetSearch()" class="btn size-S radius ml-10" value="重&nbsp;&nbsp;置">
                </div>

                <table class="table table-border table-bg table-hover table-sort mt-10 no-footer dataTable  mt-20" id="selectProduct">
                    <thead>
                    <tr class="text-c">
                        <th width="50"><input type="checkbox" name="select_all" value="1" disabled></th>
                        <th width="150">SPU码</th>
                        <th width="250">商品名称</th>
                        <th width="130">品牌</th>
<!--                        <th width="120">商品区域</th>-->
                        <th width="150">上架数量/SKU数量</th>
                        <th width="200">成本价(元)</th>
                        <th width="200">现金价(元)</th>
                        <th width="200">售价(元)</th>
                        <th width="130">计量单位</th>
                        <th width="130">状态</th>
                        <th width="80" style="text-align: right;border-right: none">操</th>
                        <th width="80" style="text-align: left;border-left: none">作</th>
                    </tr>
                    </thead>
                    <tbody class="shun"></tbody>
                </table>
                <!--</div>-->
                <div class="dataTables_wrapper goods_fanye clearfix mt-5">
                    <div class="f-r pageturning M-box3"></div>
                </div>
                <div class="mt-40"></div>
                <div class="lh-26 pl-20 mt-20">
                    <input type="checkbox" onclick="selectAll(this)" name="select_all" value="1" id="example-select-all">
                    <span>全选</span>
                    <input type="button" onclick="batchJoin()" class="btn btn-default size-S radius ml-10" value="批量参加">
                </div>
            </div>
            <div class="tabCon bk-gray bg-1 pt-20 pb-20">
                <ul class="pl-20 clearfix">
                    <li class="f-l">
                        <input type="button" class="btn btn-secondary size-S radius" value="全部打折"
                               onclick="setPromotion(this,1)">
                        <input type="text" id="allDiscount" onchange="discount(this)" class="input-text w-60 radius ml-10" style="display: none">
                        <a onclick="confirmDiscount(this,1)" style="display: none">确认</a>
                        <a onclick="cancelDiscount(this)" id="allDiscount_keep" style="display: none">取消</a>
                    </li>
                    <li class="f-l">
                        <input type="button" class="btn btn-secondary size-S radius ml-10" value="全部减价"
                               onclick="setPromotion(this,2)">
                        <input type="text" id="allReduce" onchange="reduce(this)" class="input-text w-60 radius ml-10" style="display: none">
                        <a onclick="confirmDiscount(this,2)" style="display: none">确认</a>
                        <a onclick="cancelDiscount(this)" id="allReduce_keep" style="display: none">取消</a>
                    </li>
                    <li class="f-l">
                        <input type="button" class="btn btn-secondary size-S radius ml-10" value="全部设置限购促销数量"
                               onclick="setPromotion(this,3)">
                        <input type="text" id="allSetNum" onchange="limitNum(this)" class="input-text w-60 radius ml-10" style="display: none">
                        <a onclick="confirmDiscount(this,3)" style="display: none">确认</a>
                        <a onclick="cancelDiscount(this)" id="allSetNum_keep" style="display: none">取消</a>
                    </li>
                    <li class="f-l pos-r">
                        <i class="Hui-iconfont f-20 ml-5 tips">&#xe633;</i>
                        <span class="w-250 pos-a showspan"
                              style="top:-10px;left:40px;display:none">使用【全部打折】【全部减价】【全部设置促销数量】,设置后,您还可以单独设置每个商品的折扣/减价、促销数量</span>
                    </li>
                </ul>
                <!--<table id="setProduct" class="table table-border table-bg table-hover table-sort mt-20">-->
                <table id="setProduct" class="table table-border table-bg table-hover table-sort mt-10 no-footer dataTable  mt-20 text-c"
                       style="table-layout:fixed" cellspacing="0" width="100%">
                    <thead>
                    <tr class="text-c">
                        <th width="50"><input type="checkbox" name="select_all" value="1" disabled></th>
                        <th width="70">SPU码</th>
                        <th width="70">商品名称</th>
                        <th width="70">商品Code码</th>
                        <th width="70">规格属性</th>
                        <th width="70">计量单位</th>
                        <th width="70">成本价(元)</th>
                        <th width="70">现金价(元)</th>
                        <th width="70">售价(元)</th>
                        <th width="70" style="border-right: 0px"></th>
                        <th width="70" style="border-right: 0px">促销价设置</th>
                        <th width="70" style="border-left: 0px"></th>
                        <th width="70">限购促销数量</th>
                        <th width="55">操作</th>
                    </tr>
                    </thead>
                </table>
                <div class="lh-26 pl-20 mt-20">
                    <input type="checkbox" id="pitchAll" onclick="checkedAll()" class="checkbox">
                    <span>全选</span>
                    <input type="button" onclick="cancelChecked()" class="btn btn-default size-S radius ml-10" value="批量取消">
                    <input type="button" onclick="cancelAll()" class="btn btn-default size-S radius ml-10" value="全部取消">
                </div>
                <div class="text-c mt-20">
                    <input type="submit" value="确认" class="btn btn-secondary size-S radius">
                </div>
            </div>
        </div>
    </form>
</article>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script> <!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<!--表单验证-->
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/jquery.validate.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/validate-methods.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/jquery.validation/1.14.0/messages_zh.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script src="../../ht-js/frame/doT.min.js?rev=@@hash"></script>
<script src="../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../ht-js/verifyToken.js?rev=@@hash"></script>
<script src="../../ht-js/Project.js?rev=@@hash"></script>
<!--引入分页-->
<link rel="stylesheet" href="../../lib/pagination/pagination.css">
<script src="../../lib/pagination/jquery.pagination.js?rev=@@hash"></script>
<link type="text/css" rel="stylesheet" href="../../ht-js/operation-js/time-js/jedate.css">
<script type="text/javascript" src="../../ht-js/operation-js/time-js/jquery.jedate.js?rev=@@hash"></script>
<script src="../../ht-js/commonJs/goodCategorySelect.js?rev=@@hash"></script><!--四级品类联动-->
<script src="../../ht-js/promotion/singlepro_detail.js?rev=@@hash"></script>
<script src="../../ht-js/promotion/beanConverter.js?rev=@@hash"></script>
<script src="../../ht-js/dynamicWarehouse.js?rev=@@hash"></script>
<style>
    .error {
        color: #ff1b1b;
    }

    label.error {
        position: relative;
        right: 0;
        top: 0;
    }

    td.details-control {
        cursor: pointer;
    }

    tr.shown td.details-control {
    }
</style>
<script>
    jQuery.Huitab = function (tabBar, tabCon, class_name, tabEvent, i) {
        var $tab_menu = $(tabBar);
        // 初始化操作
        $tab_menu.removeClass(class_name);
        $(tabBar).eq(i).addClass(class_name);
        $(tabCon).hide();
        $(tabCon).eq(i).show();
        $tab_menu.bind(tabEvent, function () {
            $tab_menu.removeClass(class_name);
            $(this).addClass(class_name);
            var index = $tab_menu.index(this);
            $(tabCon).hide();
            $(tabCon).eq(index).show();
        });
    }

    $(function () {
        $.Huitab("#tab_topnav .tabBar span", "#tab_topnav .tabCon", "current", "click", "0")
    });

    $('.tips').hover(function () {
        $('.showspan').show();
    }, function () {
        $('.showspan').hide();
    })

    function confirmDiscount(ev, type) {
        if (type == 1) {
            if ($("#allDiscount").val() != "") {
                $(ev).hide().siblings().not(".btn").hide();
                $(ev).siblings(".btn").show();
            }
            allDiscount(); // 全部打折
        } else if (type == 2) {
            if ($("#allReduce").val() != "") {
                $(ev).hide().siblings().not(".btn").hide();
                $(ev).siblings(".btn").show();
            }
            allReduce(); // 全部减价
        } else if (type == 3) {
            $(ev).hide().siblings().not(".btn").hide();
            $(ev).siblings(".btn").show();
            allSetNum(); //全部设置参与数量
        }
    }

    function cancelDiscount(ev) {
        $(ev).hide().siblings().not(".btn").hide();
        $(ev).siblings(".btn").show();
    }

    function setPromotion(ev, id) {
        $(ev).hide();
        $(ev).siblings().show();
        if (id == 1) {
            cancelDiscount($("#allReduce_keep"));
            cancelDiscount($("#allSetNum_keep"));
        } else if (id == 2) {
            cancelDiscount($("#allDiscount_keep"));
            cancelDiscount($("#allSetNum_keep"));

        } else if (id == 3) {
            cancelDiscount($("#allDiscount_keep"));
            cancelDiscount($("#allReduce_keep"));
        }
    }

</script>
</body>
</html>